var status = -1;

function action(d, c, b) {
    if (d === 0 && status !== 0) {
        status--
    } else {
        status++
    }
    var a = -1;
    if (status <= a++) {
        ms.dispose()
    } else {
        if (status === a++) {
            ms.warp(0, 0)
        } else {
            ms.dispose()
        }
    }
}

function start() {
    status = -1;
    action(1, 0, 0)
};